# 创建raid,默认两盘位，不是的话需修改此处
read -p "请输入第一块硬盘: " sd1
read -p "请输入第一块硬盘: " sd2
mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/$sd1 /dev/$sd2
# 挂载磁盘
mount /dev/md0 /data

# 开机自动挂载磁盘
touch /etc/rc.local
chmod 755 /etc/rc.local
echo '''#!/bin/bash''' >> /etc/rc.local
echo '''mount /dev/md0 /data''' >> /etc/rc.local
systemctl start rc-local
systemctl enable rc-local
init 6 # 重启